package com.sl.biz.modular.workflow.controller;


import com.sl.biz.modular.process.controller.request.SquareLakeProcessQueryByConditionRequest;
import com.sl.biz.modular.process.controller.request.SquareLakeProcessRemoveByIdRequest;
import com.sl.biz.modular.process.controller.response.ProcessSimpleVO;
import com.sl.biz.modular.process.dao.domain.entity.ProcessConfigDO;
import com.sl.biz.modular.workflow.dao.domain.entity.WorkflowDO;
import com.sl.biz.modular.workflow.service.WorkflowBizService;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/work_flow")
@RequiredArgsConstructor
public class WorkflowController {

    private final WorkflowBizService workflowBizService;

    @PostMapping("/list")
    public List<WorkflowDO> list(@RequestBody @Validated WorkflowDO workflowDO) {
        return workflowBizService.list(workflowDO);
    }

    @PostMapping("/save")
    public Boolean save(@RequestBody @Validated WorkflowDO workflowDO) {
        return workflowBizService.save(workflowDO);
    }


    @PostMapping("/remove_by_id")
    public Boolean removeById(@RequestBody @Validated WorkflowDO workflowDO) {
        return workflowBizService.removeById(workflowDO);
    }
}
